<?php
/**
 * Copyright (c) Sandeep Manne (sandeep.manne@gmail.com) 
 *
 * @author  Sandeep Manne
 * @since   24-May-2009, 11:30:22 AM
 * @version $
 */

/**
 * @see Core_Object
 */
require_once "Core/Object.php";

class Zone extends Core_Object
{
    protected $_zoneDAO;
    
    public function __construct()
    {
        require_once 'admin/models/DAO/ZoneDAO.php';
        $this->_zoneDAO = new ZoneDAO();
    }
    
    /**
     * Add zone to db
     * @param $zoneName
     * @return int zone_id
     */
    public function addZone($zoneName)
    {
        return $this->_zoneDAO->addZone(array('zone_name' => $zoneName));
    }
    
    /**
     * Return all zones
     * @return array
     */
    public function getZones()
    {
        return $this->_zoneDAO->getZones();
    }
    
    public function removeZone($zoneId)
    {
        return $this->_zoneDAO->deleteZone($zoneId);
    }
}
